<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<form action="vehicleBrand.action?methodName=doAddVehicleBrand" method="post">
		<table class="querytable">
			
			<tr>
				<th class="textright">品牌名称:</th>
				<td class="textleft">
					<input type="text" name="vehicleBrand" />
				</td>
				<td class="textleft" id="resultVehicleBrand"></td>
			</tr>
			<tr>
				<td align="center" colspan="3">
					<input type="submit" value="保存品牌信息" />
				</td>
			</tr>
		</table>
	</form>

<link rel="stylesheet" href="${pageContext.request.contextPath }/css/editTablestyles.css">
<script type="text/javascript" src="${pageContext.request.contextPath }/webjars/jquery/1.12.4/jquery.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/listTable.js"></script>
<script type="text/javascript">
	$(function () {
		$("input[type='submit']").click(function () {
			var vehicleBrand = $("input[name='vehicleBrand']").val();
			if (vehicleBrand=="") {
				$("#resultVehicleBrand").html("请输入品牌名称!");
				return false;
				
			}
			if (vehicleBrand.length>20) {
				$("#resultVehicleBrand").html("品牌名称得长度请确认在20位以内!");
				return false;
			}
		});
	});
</script>
</body>
</html>